import { createRoot } from 'react-dom/client'
import { RouterProvider } from 'react-router-dom'
import './index.css'
import { Spin, App } from 'antd'
import {routers} from './routers'
import { Suspense } from 'react'
import { Provider } from 'react-redux'
import store  from './redux/store'
import ThemeProvider from './components/ThemeProvider'



createRoot(document.getElementById('root')!).render(
  <Provider store={store}>
    <ThemeProvider>
        <App>
          <Suspense fallback={<Spin tip='加载中......' />}>
            <RouterProvider router={routers}></RouterProvider>
          </Suspense>
        </App>
    </ThemeProvider>
  </Provider>
)
